package com.osgix.authorize.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.osgix.authorize.model.ResourceInfo;
import com.osgix.authorize.dao.ResourceInfoDao;
import com.osgix.authorize.service.ResourceInfoManager;
import com.osgix.common.orm.Page;
import com.osgix.common.orm.ibatis.EntityDao;
import com.osgix.common.service.BaseManager;
import com.osgix.common.service.AbsBaseManager;
import com.osgix.authorize.service.ResourceInfoManager;

import com.osgix.common.orm.ibatis.BaseIbatisDao;
import org.springframework.stereotype.Repository;

@Service("resourceInfoManager")
@Transactional
public class ResourceInfoManagerImpl extends AbsBaseManager<ResourceInfo,Long> implements ResourceInfoManager{

	private ResourceInfoDao resourceInfoDao;
	
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	@Resource
	public void setResourceInfoDao(ResourceInfoDao dao) {
		this.resourceInfoDao = dao;
	}
	
	public EntityDao getEntityDao() {
		return this.resourceInfoDao;
	}
	
	public void saveResourceInfo(ResourceInfo resourceInfo) {
		resourceInfoDao.save(resourceInfo);
	}
	
	public void updateResourceInfo(ResourceInfo resourceInfo) {
		resourceInfoDao.update(resourceInfo);
	}
	
	
}
